from abc import ABCMeta
import tornado
import time
import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web
import tornado.escape
import threading
import logging
from database_resource import *

def QueryIfExist(dbcur,tableName,colom,value):
    sql = "select * from " + tableName + " where " + colom + " = ?"
    queryData = dbcur.execute(sql, (value,))
    return len(queryData.fetchall())

host_ins_new_device_addr = 'http://127.0.0.1:16000/ins_new_device'
#host_ins_new_device_addr = 'http://192.168.31.192:16000/ins_new_device'
